<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding:0px;
            margin:0px;
        }
        .container{
            width:400px;
            height: 600px;
            border:1px solid #ccc;
            border-bottom: 0px;
            margin-left:30px;
            margin-top:40px;
        }
        .container > div{
            height:100px;
            border-bottom: 1px solid #ccc;
            padding: 1px; 
            box-sizing: border-box;
        }
        .container > div > p:first-child{
            display: flex;
            justify-content: space-between;
            margin-top:30px;
            
        }
    </style>
</head>
<body>
    <div class="container"></div>
    <script>
        var book=JSON.parse(localStorage.getItem("bookTypes"));
        var container=document.querySelector(".container");
        for(var key in book){
            var div=document.createElement("div");
            var p1=document.createElement("p");
            var s1=document.createElement("span");
            s1.innerHTML=book[key].title;
            var s2=document.createElement("span");
            s2.innerHTML=">";
            p1.appendChild(s1);
            p1.appendChild(s2);


            var p2=document.createElement("p");
            for(var i=0;i<book[key].list.length;i++){
                var span=document.createElement("span");
                span.innerHTML=book[key].list[i].name;
                p2.appendChild(span);
            }
            div.appendChild(p1);
            div.appendChild(p2);
            container.appendChild(div);
        }
    </script>
</body>
</html>